feat(cli): auto-create providers for explicit --provider names#183
Merged
Conversation
…atch a known type When --provider <name> is passed and no provider with that name exists on the server, the CLI now checks if the name is a recognized provider type (e.g. claude, nvidia, github). If it is, the provider is auto-created from local credentials using the same discovery flow as inferred providers. If the name is not a recognized type, the CLI returns a clear error instead of deferring validation to the server. This eliminates the FailedPrecondition error that occurred when passing --provider nvidia on a fresh cluster where no providers had been created yet.
33d98b2 to
5d4f537
Compare
5 tasks
drew
added a commit
that referenced
this pull request
Mar 16, 2026
…atch a known type (#183) When --provider <name> is passed and no provider with that name exists on the server, the CLI now checks if the name is a recognized provider type (e.g. claude, nvidia, github). If it is, the provider is auto-created from local credentials using the same discovery flow as inferred providers. If the name is not a recognized type, the CLI returns a clear error instead of deferring validation to the server. This eliminates the FailedPrecondition error that occurred when passing --provider nvidia on a fresh cluster where no providers had been created yet.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--provider <name>is passed and no provider with that name exists, the CLI now checks if the name is a recognized provider type (e.g.claude,nvidia,github) and auto-creates it from local credentialsFailedPreconditiongRPC error)auto_create_provider()helper used by both explicit--providernames and inferred provider types, eliminating duplicationMotivation
Running
nemoclaw sandbox create --provider nvidia -- claudeon a fresh cluster failed with:The
--providerflag passed names directly to the server without any client-side validation or auto-creation. This PR makes explicit--providernames follow the same auto-creation flow as inferred providers.Test Plan
ensure_providers_integration.rs) against a mock gRPC server covering:--no-auto-providersskips missing providersprovider_auto_create.rs) that verifies the full flow end-to-end:ANTHROPIC_API_KEYin the environmentnemoclaw sandbox create --provider claude --auto-providers -- printenv ANTHROPIC_API_KEYcargo test -p navigator-cli,mise run pre-commit)